<template>
  <div class="page">
    <div class="nav">
      <van-nav-bar :title="title" left-arrow @click-left="onClickLeft"/>
    </div>
    <!-- <keep-alive :include="['collect']"> -->
      <router-view/>
    <!-- </keep-alive> -->
  </div>
</template>

<script>
export default {
  data () {
    return {}
  },
  computed: {
    title () {
      return this.$route.meta.title
    }
  },
  watch: {
    $route (value) {
      console.log(value)
    }
  },
  methods: {
    onClickLeft () {
      this.$router.back()
    }
  }
}
</script>

<style lang="less" scoped>
.page {
  padding-top: 46px;
  height: 100%;
  box-sizing: border-box;
  background-color: #eee;
  .nav {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
  }
}
</style>
